1. Field of the Invention
The present invention relates to an image processing apparatus configured to apply correction processing to an image, an image processing method, an image processing program, and a storage medium storing the program.
2. Description of the Related Art
Copying machines are equipped with a scanner that optically reads a document image and a printer that prints the read image on a paper or other recording medium. However, an edge of an optically read image tends to be dull compared to an edge of the original document. Therefore, when the printer performs printing based on the image read by the scanner, a printed image on a recording medium tends to lack sharpness.
In order to enhance sharpness, it is useful to apply edge intensifying processing to image data read by a scanner. However, the edge intensifying processing may intensify moire appearance when a halftone dot image is read. To address this problem, a segmentation technique may be applied to image data read by a scanner.
A conventional segmentation technique involves separating a read image into a character region and a halftone dot region, and applying edge intensifying processing to the character region and applying smoothing processing to the halftone dot region. As a result, the segmentation technique may improve the sharpness of characters and reduces the moire appearance.
However, if the separated regions in the segmentation is inaccurate, characters may be erroneously subjected to smoothing processing while a halftone dot image may be subjected to edge intensifying processing. As a result, image quality may deteriorate.
Furthermore, when segmentation accuracy is insufficient, characters may be determined as partly belonging to a character region and partly belonging to a halftone dot region. This causes undesirable switching between the edge intensifying processing and the smoothing processing. As a result of segmentation inaccuracy, the image quality may greatly deteriorate. To address the above-described problems, the following techniques have been proposed.
As discussed in Japanese Patent No. 03099354 (first technique), it may be useful to continuously set an edge intensifying amount depending on an edge amount. The first technique can adaptively realize edge intensification depending on the edge amount and reduce image deterioration caused by the above-described switching, although the moire appearance of a halftone dot image may be intensified.
Furthermore, an edge intensifying technique using a filter is conventionally known as a technique capable of intensifying characters.
As discussed in Japanese Patent No. 02620368 (second technique), replacement processing can be applied to an edge region having moderate density that appear in a reading operation. According to the second technique, for the purpose of obtaining a sharp edge, a moderate edge region is replaced with a solid region of a character or a background region.
However, the replacement processing for completely replacing a moderate edge region with a solid region of a character or a background region may cause jaggy image (i.e., an image having a non-smooth or zigzag edge portion). The following technique has been proposed to eliminate the jaggy image.
As discussed in Japanese Patent Application Laid-Open No. 11-127353 (third technique), smoothing processing may be performed to reduce the possibility of generating jaggy images. The third technique includes detecting where a jaggy image may appear and converting the image data in the detected region into data having high resolution and a multiple value.
A scanner for a copying machine may include a line sensor having reading elements aligned in a main-scanning direction. Such a conventional scanner can read an image of a document when the line sensor shifts in a sub-scanning direction relative to the document.
A conventional sensor may have reading resolution in the main-scanning direction which is different from reading resolution in the sub-scanning direction.
In general, the main-scanning resolution of a line sensor is dependent on the alignment intervals of reading elements. If a scanner can read a document while it causes a relative shifting in the sub-scanning direction with the resolution different from the main-scanning resolution, the reading resolution in the main-scanning direction is different from the reading resolution in the sub-scanning direction.
A copying machine, using a scanner having the main-scanning resolution different from the sub-scanning resolution, reads an image having the reading resolution in the sub-scanning direction higher than the reading resolution in the main-scanning direction, and converts the main-scanning resolution into the sub-scanning resolution when the read image is output.
The copying machine can apply edge intensifying processing to an image having the main-scanning resolution different from the sub-scanning resolution having been read by the above-described scanner. Then, the copying machine can convert the main-scanning resolution into the sub-scanning resolution when the read image is output.
In this case, to convert the resolution in the main-scanning direction (i.e., low resolution reading direction) into the resolution in the sub-scanning direction (i.e., high resolution reading direction), on the image that was subjected to the edge intensifying processing, the copying machine performs the conversion so as to increase the number of pixels aligned in the main-scanning direction. As a result, a jaggy edge portion of a character or a line segment resulting from the edge intensifying processing may expand in the sub-scanning direction.
Furthermore, there is a scanner having MTF (Modulation Transfer Function) varying depending on the direction due to lens characteristics. The defocused state and sharpness are depending on the direction, and a jaggy image region may appear if the replacement processing discussed in Japanese Patent No. 02620368 is applied to the image.